<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../../" />
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		<h1>[name]</h1>
		<p class="desc">
			"Interleaved" means that multiple attributes, possibly of different types,
			(e.g., position, normal, uv, color) are packed into a single array buffer.
			<br /><br />
			An introduction into interleaved arrays can be found here:
			[link:https://blog.tojicode.com/2011/05/interleaved-array-basics.html Interleaved array basics]
		</p>

		<h2>Examples</h2>
		<p>
			[example:webgl_buffergeometry_points_interleaved webgl / buffergeometry / points / interleaved]
		</p>

		<h2>Constructor</h2>
		<h3>[name]( [param:TypedArray array], [param:Integer stride] )</h3>
		<p>
			[page:TypedArray array] -- A typed array with a shared buffer. Stores the
			geometry data.<br />
			[page:Integer stride] -- The number of typed-array elements per vertex.
		</p>

		<h2>Properties</h2>

		<h3>[property:Array array]</h3>
		<p>A typed array with a shared buffer. Stores the geometry data.</p>

		<h3>[property:Integer stride]</h3>
		<p>The number of typed-array elements per vertex.</p>

		<h3>[property:Integer count]</h3>
		<p>Gives the total number of elements in the array.</p>

		<h3>[property:Object updateRanges]</h3>
		<p>
			Array of objects containing:<br />
			[page:Integer start]: Position at which to start
			update.<br />
			[page:Integer count]: The number of components to update. <br /><br />

			This can be used to only update some components of stored data. Use
			the [page:InterleavedBuffer.addUpdateRange addUpdateRange] function
			to add ranges to this array.
		</p>

		<h3>[property:String uuid]</h3>
		<p>
			[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of
			this instance. This gets automatically assigned, so this shouldn't be
			edited.
		</p>

		<h3>[property:Integer version]</h3>
		<p>
			A version number, incremented every time the needsUpdate property is set
			to true.
		</p>

		<h3>[property:Boolean needsUpdate]</h3>
		<p>
			Default is `false`. Setting this to true increments
			[page:InterleavedBuffer.version version].
		</p>

		<h3>[property:Usage usage]</h3>
		<p>
			Defines the intended usage pattern of the data store for optimization
			purposes. Corresponds to the `usage` parameter of
			[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData WebGLRenderingContext.bufferData]().
		</p>

		<h2>Methods</h2>

		<h3>[method:this addUpdateRange]( [param:Integer start], [param:Integer count] )</h3>
		<p>
			Adds a range of data in the data array to be updated on the GPU. Adds an
			object describing the range to the [page:InterleavedBuffer.updateRanges updateRanges]
			array.
		</p>

		<h3>[method:this clearUpdateRanges]()</h3>
		<p>
			Clears the [page:InterleavedBuffer.updateRanges updateRanges] array.
		</p>

		<h3>[method:this copy]( [param:InterleavedBuffer source] )</h3>
		<p>Copies another [name] to this [name].</p>

		<h3>[method:this copyAt]( [param:Integer index1], [param:InterleavedBuffer attribute], [param:Integer index2] )</h3>
		<p>
			Copies data from `attribute[index2]` to [page:InterleavedBuffer.array array][index1].
		</p>

		<h3>[method:this set]( [param:TypedArray value], [param:Integer offset] )</h3>
		<p>
			value - The source (typed) array.<br />
			offset - The offset into the target array at which to begin writing values
			from the source array. Default is `0`.<br /><br />

			Stores multiple values in the buffer, reading input values from a
			specified array.
		</p>

		<h3>[method:InterleavedBuffer clone]( [param:Object data] )</h3>
		<p>
			data - This object holds shared array buffers required for properly
			cloning geometries with interleaved attributes.<br /><br />

			Creates a clone of this [name].
		</p>

		<h3>[method:this setUsage] ( [param:Usage value] )</h3>
		<p>Set [page:InterleavedBuffer.usage usage] to value.</p>

		<h3>[method:Object toJSON]( [param:Object data] )</h3>
		<p>
			data - This object holds shared array buffers required for properly
			serializing geometries with interleaved attributes.<br /><br />

			Serializes this [name].
		</p>

		<h2>Source</h2>

		<p>
			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
		</p>
	</body>
</html>
